<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@include file="/include/public.jspf"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/m-base.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/m-common.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/p-all.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/member.css" />
<script type="text/javascript" src="${path }/js/jquery1.10.2.min.js"></script>
<script type="text/javascript" src="${path }/js/morepaging-invest.js"></script><!-- 分页数据拼接 -->
<script type="text/javascript" src="${path }/js/helper.js"></script>
<script type="text/javascript" src="${path }/js/common/base.js"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>

<title>魔环金融</title>
</head>
<body>
  <div class="ui_title">
        <a class="ui_back" href="${path }/member/center.htm"><i class="ui_icon_back"></i>返回</a>
        我的红包</div>
    <section class="m-main p_account_bonus p_account_invitation">
       <ul class="ui_tab_nav ui_tab_num3 ui_border_t">
           <li class=""><span><a href="${path }/redpacket/redlist.htm?type=1">注册红包</a><em></em></span></li>
           <li class="select"><span>投资红包<em></em></span></li>
           <li class=""><span><a href="${path }/redpacket/redlist.htm?type=3">分享红包</a><em></em></span></li>
      </ul>
      <div class="mt15">
		<div class="tab_box">
			 <!--  投资红包 -->
		     <div class="tab1" style=";">
		         <%-- <div class="bonus-reclist bg-white ui_border_b">
		         <c:if test="${fn:length(dataList)>0 }">
                    <c:forEach items="${dataList }" var="item">
                    <dl class="ui_con_jl">
		          		<dt>    
		          			<p class="f15"><span class="ui_stutas">${item.rewardUseType.text }</span>${item.rewardType.text }
		          			</p>    
		          			<p class="gray_v1"><fmt:formatDate value="${item.endtime}" type="date" pattern="yyyy-MM-dd HH:mm:ss"/></p>
		          		</dt>
		          		<dd>
		          			<div class="ui_middle">
		          			<c:choose>
		         				<c:when test="${item.status eq 'CANUSE' }">
		         					<p class="red_v1 f15">${item.money/100}元</p>
		         					<a class="f15 btfx_ty" id="inviteBtn" href="javascript:void()">分享</a>
		         				</c:when>
		         				<c:otherwise>
		         					<p class="gray_v1 f15">${item.money/100}元</p>
									<span class="gray_v1">${item.status.text}</span>
		         				</c:otherwise>
		         			</c:choose>
		          			</div>
		          		</dd>
		          	</dl>
                    </c:forEach>
			     </c:if>
		         </div> --%>
		         
		        <div class="bonus-reclist bg-white ui_border_b" id="list_more"></div>
				<div class="ui_loadmore_text">
				<input type="hidden" value="" id="pagenumber">
					<a href="javascript:void(0);" class="more">点击加载更多</a>
				</div>
				
		    </div>
		</div>    
      </div>
    </section>
    <script type="text/javascript">
    //加载更多--分页
	    	var isLogin = ${isLogin};
	    	if(!isLogin){
	    		window.location.href="${path }/user/login/index.jsp";
	    	}
	        // tab事件绑定
	        var page = 2;
	        $(document).on('click','.more',function(){
	            reqData(page, '#list_more');
	            page++;
	        });
	     	// ajax请求
			function reqData(page, pageSelector) {
				$('.ui_loadmore_text').html('<div class="ui_loading"><div class="bar1"></div><div class="bar2"></div><div class="bar3"></div><div class="bar4"></div><div class="bar5"></div><div class="bar6"></div><div class="bar7"></div><div class="bar8"></div><div class="bar9"></div><div class="bar10"></div><div class="bar11"></div><div class="bar12"></div></div>&nbsp;&nbsp;正在加载');
				$.ajax({
					url : '${path }/redpacket/list.htm',
					type : 'post',
					data : {
						curPage : page,
						type:2,
					},
					success : function(data) {
						data = $.parseJSON(data);
						addHtml(data);
						if (data.pageCount[0] <= 0) {
							$(pageSelector).hide();
							return;
						} else {
							$(pageSelector).show();
						}
					},
					error : function() {
					}
				})
			}
			// 初始数据
	        reqData(1,'#list_more');
			
			
    </script>

</body>
</html>